﻿#region Copyright Info

// 
// Majesty of Omega - The next evolution of macro management space strategy
// 
// Copyright 2007-2009 André Claaßen
// 
// This file is protected by the terms and conditions of the
// Microsoft Community License (Ms-CL 1.1), a copy of which should
// have been distributed along with this software. If not,
// you may find the license information at the following URL:
// 
// http://www.microsoft.com/resources/sharedsource/licensingbasics/communitylicense.mspx

#endregion

#region

using System.Collections.Generic;
using System.Linq;
using Majesty_of_Omega.Config;
using Majesty_of_Omega.Model.Report;
using Majesty_of_Omega.Model.Research;
using Majesty_of_Omega.Logic.Calculate;
using Majesty_of_Omega.Logic.Generator;

#if NUNIT
using NUnit.Framework;
using Test.Majesty_of_Omega.TestUtils;
using TestClass = NUnit.Framework.TestFixtureAttribute;
using TestMethod = NUnit.Framework.TestAttribute;
using TestInitialize = NUnit.Framework.SetUpAttribute;
using TestCleanup = NUnit.Framework.TearDownAttribute;
using ClassInitialize = NUnit.Framework.TestFixtureSetUpAttribute;
using ClassCleanup = NUnit.Framework.TestFixtureTearDownAttribute;
using Majesty_of_Omega.Model.Game;

#elif MBUNIT
using MbUnit.Framework;
using TestClass = MbUnit.Framework.TestFixtureAttribute;
using TestMethod = MbUnit.Framework.TestAttribute;
using TestInitialize = MbUnit.Framework.SetUpAttribute;
using TestCleanup = MbUnit.Framework.TearDownAttribute;
using ClassInitialize = MbUnit.Framework.TestFixtureSetUpAttribute;
using ClassCleanup = MbUnit.Framework.TestFixtureTearDownAttribute;
#else
using Microsoft.VisualStudio.TestTools.UnitTesting;
#endif

#endregion

namespace Test.Majesty_of_Omega.BL.Logic
{
    /// <summary>
    /// Tests for <see cref="NextTurnCalculator" /> class
    /// </summary>
    [TestClass]
    public class TestNextTurnCalculator
    {
        /// <summary>
        /// Tests the research calculations.
        /// </summary>
        [TestMethod]
        public void TestResearchCalculations()
        {
            SaveGame game = TestDataGenerator.TestSaveGame;

            // give max. research
            ResearchManager manager = game.HumanPlayer.ResearchManager;
            manager.TotalResearchPointsOfCurrentTurn = 50000;
            Assert.AreEqual(0, manager.TechAvailableAppliedResearchs.Count);
            NextTurnCalculator calculator = new NextTurnCalculator(game);
            calculator.CalculateNextTurn();
            Assert.IsTrue(manager.TechAvailableAppliedResearchs.Count > 0);
        }
    }
}